<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>示例11</title>
</head>
<body>
    <div id="app">
      <h1>价格:{{price}}</h1>
      <h1>添加价格符号:{{ price | myCurrency('￥')}}</h1>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <script type="text/javascript">
        var vm=new Vue({
            el:'#app',
            data:{
               price:356
            },
            filters:{
                //myInput:要处理的值
                //arg1:过滤器传递过来的参数￥符号
                myCurrency:function(myInput,arg1){
                    var result=arg1+myInput;
                    return result;
                }
            }
        })
    </script>
</body>
</html>